# -*- coding: utf-8 -*-
# @Time    : 2020/5/12 10:32
# @Author  : suhong
# @File    : models.py
# @Software: PyCharm
import datetime

from mongoengine import Document, DateTimeField, DictField, StringField
from pydantic import BaseModel


class CxJournalDetail(Document):
    meta = {'db_alias': 'db243cxqk'}
    cid = StringField(max_length=20, primary_key=True)
    down_date = StringField(max_length=20)
    jsondicts = DictField()
    qwcontentDivId_stat = StringField()
    qwDiv_len = StringField()
    pdf_html_stat = StringField()
    up_hdfs_stat = StringField()
    old_latest_stat = StringField()
    html_detail = StringField()
    create_time = DateTimeField(default=datetime.datetime.now())
    update_time = DateTimeField(default=datetime.datetime.now())

class CxJournalDetailModel(BaseModel):
    cid: str
    down_date: str
    jsondicts: dict
    qwcontentDivId_stat: str
    qwDiv_len: str
    html_detail: str
    pdf_html_stat:str
    old_latest_stat: str
    up_hdfs_stat: str

